package com.eupmt.lab3.domain;

import com.eupmt.lab3.domain.ibator.IbatorProducte;
import static com.eupmt.lab3.utils.Constants.*;

public class Producte extends IbatorProducte {
   //Atributs

   //Constructors
   public Producte() {
      super();
      setIdproducte(UNDEFINED);
   }

   //Overrides
   @Override
   public boolean equals(Object o) {
      return (o != null) &&
              (o instanceof Producte) &&
              (getNumserie().equals(((Producte) o).getNumserie()));
   }

   @Override
   public int hashCode() {
      int hash = 5;
      return hash;
   }

   @Override
   public String toString() {
      String str = "\n Producte.\n";
      str += "idproducte: " + getIdproducte() + "\n";
      str += "idarticle: " + getIdarticle() + "\n";
      str += "ddistribuidor: " + getIddistribuidor() + "\n";
      str += "Numserie: " + getNumserie() + "\n";
      str += "Nom: " + getNom() + "\n";
      str += "Dataenviament: " + getDataenviament() + "\n";
      return str;
   }
}
